; -*- mode: lisp; -*-

(RSG 0 1)
(
 (templ $name $perceptorName $effectorName $attach
	$x $y $z
	$LowerarmLength $LowerarmWidth $LowerarmHeight $LowerarmMass
	$HandBox1Length $HandBox1Width $HandBox1Height $HandBox1Mass
	$HandBox2Length $HandBox2Width $HandBox2Height
	$HandBox3Length $HandBox3Width $HandBox3Height $HandBox3Mass
	$anchorX $anchorY $anchorZ
	$axisX $axisY $axisZ $minDeg $maxDeg
	$ElbowRadius $ElbowLen $armMat $handMat $side $scale)

 (nd Transform
     (setName $name)
     (setLocalPos $x $y $z)
     (importScene rsg/agent/soccerbot058/lowerarm_body.rsg
		  $LowerarmLength $LowerarmWidth $LowerarmHeight $LowerarmMass
		  $HandBox1Length $HandBox1Width $HandBox1Height $HandBox1Mass
		  $HandBox2Length $HandBox2Width $HandBox2Height
		  $HandBox3Length $HandBox3Width $HandBox3Height $HandBox3Mass
		  $armMat $handMat $side $scale)

     ;; install hinge joint
     (importScene rsg/agent/nao/hingejoint.rsg
		  $perceptorName $effectorName
		  ../boxBody $attach
		  $anchorX    $anchorY   $anchorZ
		  $axisX      $axisY     $axisZ
		  $minDeg $maxDeg)

;;;      (nd ObjectState
;;; 	 (setID $name)
     )

     ;; static cylinder for the elbow
     (nd Transform
	 (setLocalPos $anchorX $anchorY $anchorZ)
	 (setLocalRotation 0 90 0)
	 (nd Capsule
	     (setMaterial matGrey)
	     (setParams $ElbowRadius $ElbowLen)
	     )
	 )
     )
)
